package com.example.dcs.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.example.dcs.entity.UserInfo;

@RestController
public class IndexController {
    private static final Logger     logger    = LoggerFactory.getLogger(IndexController.class);
    
    @RequestMapping(value="/index/{id}",method = RequestMethod.GET)
    public UserInfo view(@PathVariable("id") Long id) {
        UserInfo user = new UserInfo();
        user.setId(id);
        user.setName("name_"+id);
        return user;  
    }  
}
